f0f7bee70d4a0bdee788dd90939c273003c5f96a,applications/order/src/org/ofbiz/order/quote/QuoteServices.java,QuoteServices,sendQuoteReportMail,#DispatchContext#Map#,49
Before Change
}
String bodyScreenLocation = productStoreEmail.getString("bodyScreenLocation");
if (UtilValidate.isEmpty(bodyScreenLocation)) {
return ServiceUtil.returnFailure("No valid bodyScreenLocation in email setting for store with productStoreId=" + quote.get("productStoreId") + " and emailType=" + emailType);
}
sendMap.put("bodyScreenUri", bodyScreenLocation);
String xslfoAttachScreenLocation = productStoreEmail.getString("xslfoAttachScreenLocation");
sendMap.put("xslfoAttachScreenLocation", xslfoAttachScreenLocation);
if ((sendTo == null) || !UtilValidate.isEmail(sendTo)) {
return ServiceUtil.returnError("No sendTo email address found");
}
Map<String, Object> bodyParameters = UtilMisc.<String, Object>toMap("quoteId", quoteId, "userLogin", userLogin, "locale", locale);
After Change
}
if (quote == null) {
return ServiceUtil.returnError(UtilProperties.getMessage(resource,
"OrderOrderQuoteCannotBeFound",
UtilMisc.toMap("quoteId", quoteId), locale));
}
GenericValue productStoreEmail = null;
try {
productStoreEmail = delegator.findByPrimaryKey("ProductStoreEmailSetting", UtilMisc.toMap("productStoreId", quote.get("productStoreId"), "emailType", emailType));
} catch (GenericEntityException e) {
Debug.logError(e, "Problem getting the ProductStoreEmailSetting for productStoreId=" + quote.get("productStoreId") + " and emailType=" + emailType, module);
}
if (productStoreEmail == null) {
return ServiceUtil.returnFailure(UtilProperties.getMessage(resourceProduct,
"ProductProductStoreEmailSettingsNotValid",
UtilMisc.toMap("productStoreId", quote.get("productStoreId"),
"emailType", emailType), locale));
}
String bodyScreenLocation = productStoreEmail.getString("bodyScreenLocation");
if (UtilValidate.isEmpty(bodyScreenLocation)) {
return ServiceUtil.returnFailure(UtilProperties.getMessage(resourceProduct,
"ProductProductStoreEmailSettingsNotValidBodyScreenLocation",
UtilMisc.toMap("productStoreId", quote.get("productStoreId"),
"emailType", emailType), locale));
}
sendMap.put("bodyScreenUri", bodyScreenLocation);
String xslfoAttachScreenLocation = productStoreEmail.getString("xslfoAttachScreenLocation");